using System;
using System.Configuration;
using System.Diagnostics.CodeAnalysis;


namespace Microsoft.Practices.Repository.Oracle
{

   /// <summary>
   /// Constants for specific Oracle error codes.
   /// </summary>
   public static class ErrorCodes
   {

      /// <summary>
      /// Oracle concurrency violation error code.
      /// </summary>
      /// <remarks>
      /// In Oracle, there is no predefined concurrency violation error code.  This is a user error code
      /// and can vary in each organization.  Adjust this error code as needed for your implementation.
      /// </remarks>
      /// <value>Unless specified in configuration, the default value is 20801.</value>
      public static readonly Int32 ConcurrencyViolationError =
         Properties.Settings.Default.OracleConcurrencyErrorCode;

      /// <summary>
      /// ORA-1017: invalid username/password; logon denied.
      /// </summary>
      /// <value>Unless specified in configuration, the default value is 1017.</value>
      [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "Username")]
      public static readonly Int32 InvalidUsernamePassword =
         Properties.Settings.Default.OracleInvalidUsernamePassword;

      /// <summary>
      /// ORA-12154: TNS:could not resolve the connect identifier specified
      /// </summary>
      /// <value>Unless specified in configuration, the default value is 12154.</value>
      [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Tns")]
      public static readonly Int32 ConnectIdentifierCannotBeResolvedByTns =
         Properties.Settings.Default.OracleConnectIdentifierCannotBeResolvedByTns;

   }


}
